package com.hjy.utils;

import com.hjy.pojo.UserDetail;
import com.hjy.pojo.UserInfo;

import java.util.ArrayList;
import java.util.Arrays;

//@Component
public class UserDetailHandlerImpl implements UserDetailHandler{
    @Override
    public UserDetail loadUserByUsername(String username) {
        UserDetail userDetail = new UserDetail();
        userDetail.setRoles(new ArrayList<String>(Arrays.asList("user1", "user2")));
        userDetail.setAuths(new ArrayList<String>());
        return userDetail;
    }

    @Override
    public Boolean loginCorrect(UserInfo userInfo) {
        return true;
    }
}
